package org.darkforest.common.services.impl;

import org.darkforest.common.services.StoreJoinInService;
import org.darkforest.dao.mapper.StoreJoinInMapper;
import org.darkforest.model.StoreJoinIn;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * Created by admin on 2015/9/2.
 */
@Service
public class StoreJoinInServiceImpl implements StoreJoinInService {

    @Autowired
    private StoreJoinInMapper storeJoinInMapper;

    public StoreJoinIn selectByPrimaryKey(Integer memberId){
        StoreJoinIn storeJoinIn =storeJoinInMapper.selectByPrimaryKey(memberId);
        return storeJoinIn;
    }

    public  StoreJoinIn add(StoreJoinIn record){
        storeJoinInMapper.insert(record);
        return record;
    }

    public void  updateByPrimaryKey(StoreJoinIn record){
        this.updateStoreJoinInByPrimaryKey(record);
    }

    public List<StoreJoinIn> findStoreJoinInByCondition(StoreJoinIn record){
        List<StoreJoinIn>  storeJoinIns= storeJoinInMapper.findStoreJoinInByCondition(record);
        return storeJoinIns;
    }

    public void  updateStoreJoinInByPrimaryKey(StoreJoinIn record){
       storeJoinInMapper.updateStoreJoinInByPrimaryKey(record);
    }

    @Override
    public void insertSelective(StoreJoinIn sj) {
        storeJoinInMapper.insertSelective(sj);
    }



    public int deleteByPrimaryKey(Integer memberId) {
        return storeJoinInMapper.deleteByPrimaryKey(memberId);
    }
}
